﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupSplit</title>

<link rel="stylesheet" type="text/css" href="../../style.css">
<style type="text/css">
.style1 {
	font-size: large;
}
</style>
</head>
<body>
<div id="navigation">
  <ul>
    <li><a href="#Creation">Creation</a></li>
    <li><a href="#Attributes">Attributes</a></li>
    <li><a href="#Callbacks">Callbacks</a></li>
    <li><a href="#Notes">Notes</a></li>
    <li><a href="#Examples">Examples</a></li>
    <li><a href="#SeeAlso">See Also</a></li>
  </ul>
</div>

<h2>IupSplit <span class="style1">(since 3.1)</span></h2>
<p>Creates a void container that split its client area in two. Allows the provided controls to be 
enclosed in a box that allows expanding and contracting the element <strong>size</strong> in one 
direction, but when one is expanded the other is contracted.</p>

  <p>
  It does not have a native representation, but it contains also a <strong>IupCanvas</strong> to implement 
	the bar handler.</p>

<h3><a name="Creation">Creation</a></h3>

<pre>Ihandle* IupSplit(Ihandle*<strong> child1</strong>, Ihandle*<strong> child2</strong>); [in C]
iup.split{<strong>child1</strong>, <strong>child2</strong>: ihandle} -&gt; (<strong>elem</strong>: ihandle) [in Lua]
split(<strong>child1</strong>, <strong>child2</strong>) [in LED]</pre>
  <p><strong>child1</strong>: Identifier of an interface element that will be at 
	left or top. It can be NULL.<br>
	<strong>child2</strong>: Identifier of an interface element that will be at 
	right or bottom. It can be NULL.</p>
  <p>
  <u>Returns:</u> the identifier of the 
  created element, or NULL if an error occurs.</p>

<h3><a name="Attributes">Attributes</a></h3>


<p><strong>AUTOHIDE</strong> (<font SIZE="3">non inheritable</font>): if the 
child client area is smaller than the bar size, then automatically hide the 
child. Default: NO.</p>
<p><strong>BARSIZE</strong> (<font SIZE="3">non inheritable</font>): controls 
the size of the bar handler. Default: 5.</p>
<p><strong>COLOR</strong>: Changes the color of the
  bar grip affordance. The value should be given in &quot;R G B&quot; color style. 
Default: &quot;192 192 192&quot;.</p>


<p><strong>ORIENTATION</strong> (creation only): Indicates the orientation of the bar handler. 
The direction of the resize is perpendicular to the orientation. Possible values are &quot;VERTICAL&quot; or &quot;HORIZONTAL&quot;. Default: &quot;VERTICAL&quot;.</p>
<p><a href="../attrib/iup_expand.html">EXPAND</a> (<font SIZE="3">non inheritable</font>): 
The default value is &quot;YES&quot;.</p>
<p><strong>LAYOUTDRAG</strong> (<font SIZE="3">non inheritable</font>): When the 
bar is moved automatically update the children layout. Default: YES. If set to 
NO then the layout will be updated only when the mouse drag is released.</p>
<p><strong>MINMAX</strong> (<font SIZE="3">non inheritable</font>): sets minimum 
and maximum crop values for VALUE, in the format &quot;%d:%d&quot; [min:max]. The min 
value can not be less than 0, and the max value can not be larger than 1000. 
This will constrain the interactive change of the bar handler. Default: 
&quot;0:1000&quot;. (Since 3.2)</p>
<p><strong>SHOWGRIP</strong> (<font SIZE="3">non inheritable</font>): Shows the 
bar grip affordance. Default: YES. When set to NO, the BARSIZE is changed from 5 
to 3.</p>
<p><strong>VALUE</strong> (<font SIZE="3">non inheritable</font>): The proportion of the left or 
top (child1) client area relative to the full available area. It is an 
integer between 0 and 1000. If not defined or set to NULL, the Native size of 
the two children will define its initial size.</p>

  <p><b>WID</b> (read-only): returns -1 if mapped.</p>

  <blockquote>
    <hr>
</blockquote>

  <p>
<a href="../attrib/iup_font.html">FONT</a>,
    <a href="../attrib/iup_size.html">SIZE</a>,
<a href="../attrib/iup_rastersize.html">RASTERSIZE</a>,
<a href="../attrib/iup_clientsize.html">CLIENTSIZE</a>, 
	<a href="../attrib/iup_clientoffset.html">CLIENTOFFSET</a>, 
	<a href="../attrib/iup_position.html">POSITION</a>, 
<a href="../attrib/iup_minsize.html">
MINSIZE</a>, <a href="../attrib/iup_maxsize.html">
MAXSIZE</a>: 
also accepted.</p>

<h3>Notes</h3>
<p>The controls that you want to be resized must have the EXPAND=YES attribute set. 
The control inside the split will not be resized with a size lesser than its
<strong>Natural</strong> size. See the <a href="../layout_guide.html">Layout Guide</a> for mode details 
  on sizes.</p>
<p><strong>IupSplit</strong> is not capable of detecting a child minimum size, 
so if a child has a minimum size, then manually set the <strong>MINMAX</strong> 
attribute to avoid invalid positioning of the <strong>IupSplit</strong> bar.</p>
<p>The <strong>IupCanvas</strong> bar handler is always the first child of the 
split. It can be obtained using <strong>IupGetChild</strong> or <strong>
IupGetNextChild</strong>.</p>
<p>The <strong>IupSplit</strong> control looks just like the <strong>IupSbox</strong>, 
but internally is very different. While sbox controls only one element and can 
push other elements outside the dialog, split balance its internal size and 
never push other elements outside its boundaries.</p>

<p>The container can be created with no elements and be dynamic filled using
  <a href="../func/iupappend.html">IupAppend</a> or
<a href="../func/iupinsert.html">IupInsert</a>.</p>


<h3><a name="Examples">Examples</a></h3>
<p><a href="../../examples/">Browse for Example Files</a></p>

<div align="center">
  <center>
  <table border="0" cellpadding="6" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
    <tr>
      <td><img border="0" src="images/iupsplit1.png"><br>
		Natural Size</td>
      <td><img border="0" src="images/iupsplit2.png"><br>
		After Moving the Split Bar</td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>
